unsigned long hypercall_create_continuation(
unsigned int op, const char *format, ...)
{
- struct mc_state *mcs = &this_cpu(mc_state);
+ struct mc_state *mcs = ¤t->mc_state;
struct vcpu *v = current;
const char *p = format;
unsigned long arg;
unsigned long hypercall_create_continuation(
unsigned int op, const char *format, ...)
{
- struct mc_state *mcs = &this_cpu(mc_state);
+ struct mc_state *mcs = ¤t->mc_state;
struct cpu_user_regs *regs;
const char *p = format;
unsigned long arg;
int hypercall_xlat_continuation(unsigned int *id, unsigned int mask, ...)
{
int rc = 0;
- struct mc_state *mcs = &this_cpu(mc_state);
+ struct mc_state *mcs = ¤t->mc_state;
struct cpu_user_regs *regs;
unsigned int i, cval = 0;
unsigned long nval = 0;
if ( err == __HYPERVISOR_mmuext_op )
{
struct cpu_user_regs *regs = guest_cpu_user_regs();
- struct mc_state *mcs = &this_cpu(mc_state);
+ struct mc_state *mcs = ¤t->mc_state;
unsigned int arg1 = !test_bit(_MCSF_in_multicall, &mcs->flags)
? regs->ecx
: mcs->call.args[1];
{
__domain_crash(current->domain);
- /*
- * Flush multicall state before dying if a multicall is in progress.
- * This shouldn't be necessary, but some architectures are calling
- * domain_crash_synchronous() when they really shouldn't (i.e., from
- * within hypercall context).
- */
- if ( this_cpu(mc_state).flags != 0 )
- {
- dprintk(XENLOG_ERR,
- "FIXME: synchronous domain crash during a multicall!\n");
- this_cpu(mc_state).flags = 0;
- }
-
vcpu_end_shutdown_deferral(current);
for ( ; ; )
#include <asm/hardirq.h>
#ifndef COMPAT
-DEFINE_PER_CPU(struct mc_state, mc_state);
typedef long ret_t;
#define xlat_multicall_entry(mcs)
#endif
do_multicall(
XEN_GUEST_HANDLE(multicall_entry_t) call_list, unsigned int nr_calls)
{
- struct mc_state *mcs = &this_cpu(mc_state);
+ struct mc_state *mcs = ¤t->mc_state;
unsigned int i;
if ( unlikely(__test_and_set_bit(_MCSF_in_multicall, &mcs->flags)) )
struct task_slice next_slice;
ASSERT(!in_irq());
- ASSERT(this_cpu(mc_state).flags == 0);
perfc_incr(sched_run);
};
};
-DECLARE_PER_CPU(struct mc_state, mc_state);
-
#endif /* __XEN_MULTICALL_H__ */
#include <public/mem_event.h>
#include <xen/cpumask.h>
#include <xen/nodemask.h>
+#include <xen/multicall.h>
#ifdef CONFIG_COMPAT
#include <compat/vcpu.h>
/* Tasklet for continue_hypercall_on_cpu(). */
struct tasklet continue_hypercall_tasklet;
+ /* Multicall information. */
+ struct mc_state mc_state;
+
struct arch_vcpu arch;
};